package com.ruoyi.system.mapper;

import java.util.List;
import com.ruoyi.system.domain.YyAppointmentTime;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

/**
 * 预约时间段Mapper接口
 *
 * @author ruoyi
 * @date 2025-03-25
 */
public interface YyAppointmentTimeMapper
{
    /**
     * 查询预约时间段
     *
     * @param id 预约时间段主键
     * @return 预约时间段
     */
    public YyAppointmentTime selectYyAppointmentTimeById(Long id);

    /**
     * 查询预约时间段列表
     *
     * @param yyAppointmentTime 预约时间段
     * @return 预约时间段集合
     */
    public List<YyAppointmentTime> selectYyAppointmentTimeList(YyAppointmentTime yyAppointmentTime);

    /**
     * 新增预约时间段
     *
     * @param yyAppointmentTime 预约时间段
     * @return 结果
     */
    public int insertYyAppointmentTime(YyAppointmentTime yyAppointmentTime);

    /**
     * 修改预约时间段
     *
     * @param yyAppointmentTime 预约时间段
     * @return 结果
     */
    public int updateYyAppointmentTime(YyAppointmentTime yyAppointmentTime);

    /**
     * 删除预约时间段
     *
     * @param id 预约时间段主键
     * @return 结果
     */
    public int deleteYyAppointmentTimeById(Long id);

    /**
     * 批量删除预约时间段
     *
     * @param ids 需要删除的数据主键集合
     * @return 结果
     */
    public int deleteYyAppointmentTimeByIds(String[] ids);

    @Select("select * from yy_appointment_time where appointmentTime = #{yueTime} and department_id = #{departmentId}")
    YyAppointmentTime selectYyAppointmentTime(@Param("yueTime") String yueTime,@Param("departmentId") Integer departmentId);

    void updateBatch(@Param("list") List<YyAppointmentTime> arrayList);


    List<YyAppointmentTime> selectYyAppointment(@Param("doctorId") Integer doctorId, @Param("departmentId") Integer departmentId);
}
